import request from '@/utils/request'

// 创建演练计划
export function createEmergencyReservePlainDrill(data) {
  return request({
    url: '/biz/emergency-reserve-plain-drill/create',
    method: 'post',
    data: data
  })
}

// 更新演练计划
export function updateEmergencyReservePlainDrill(data) {
  return request({
    url: '/biz/emergency-reserve-plain-drill/update',
    method: 'put',
    data: data
  })
}

// 删除演练计划
export function deleteEmergencyReservePlainDrill(id) {
  return request({
    url: '/biz/emergency-reserve-plain-drill/delete?id=' + id,
    method: 'delete'
  })
}

// 获得演练计划
export function getEmergencyReservePlainDrill(id) {
  return request({
    url: '/biz/emergency-reserve-plain-drill/get?id=' + id,
    method: 'get'
  })
}

// 获得演练计划分页
export function getEmergencyReservePlainDrillPage(query) {
  return request({
    url: '/biz/emergency-reserve-plain-drill/page',
    method: 'get',
    params: query
  })
}

// 导出演练计划 Excel
export function exportEmergencyReservePlainDrillExcel(query) {
  return request({
    url: '/biz/emergency-reserve-plain-drill/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
